<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>项目启动表-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<style>
.select-cont.active{
	border-top:1px solid #e5e5e5;
}
</style>
</head>
<body>
<include file="Include:header" />
<include file="Include:left" />
<div id="main">
	<div class="crumbs">
		<div class="crumbs-text"><if condition="$project['info_id'] neq NULL">商务跟进</if>项目 > [{$project['project_num']}]{$project['project_name']} > 项目启动表</div>
	</div>
	<div id="content">
		<include file="Include:project_header" />
		<form method="post" name="number_validate" id="password_validate" novalidate="novalidate">
			<input type="hidden" name="action" value="add">
			<input type="hidden" name="pid" value="{$project['id']}">
			<input type="hidden" name="id" value="{$project_bg['id']}">
			<if condition="($project['center_id'] eq 130004) or ($project['center_id'] eq 130005) or ($project['center_id'] eq 130003) or ($project['center_id'] eq 130011)">
			<div class="form-main">
				<div class="form-title">甲方信息</div>
				<div class="form-item clearfix">
					<div class="input-label"><if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><span class="asterisk">*</span></if>项目客户</div>
					<div class="input-item">
						<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
							<button type="button" class="btn add_cus">添加客户</button>
							<span class="error-item">必填项</span>
						<else/>
							<foreach name="customer" item="vo">
								<span class="mr20">
									<a href="javascript:;" class="detail" mid="{$vo['id']}">{$vo['username']}<if condition="$vo['company_name'] neq NULL">【{$vo['company_name']}】</if></a>
									<if condition="($project_bg['status'] eq 1) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
										<a href="javascript:;" data-toggle="tooltip" class="btn-edit ml20" data-placement="right" title="编辑" class="ml5" mid="{$vo['id']}" pid="{$project['id']}"><i class="glyphicon glyphicon-edit"></i></a>
									</if>
								</span>
							</foreach>
						</if>
					</div>
				</div>
				<div class="add-cont">
					<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
						<foreach name="customer" item="vo">
							<div class="form-item user-add clearfix">
								<div class="input-label"></div>
								<div class="input-item">
									<span>{$vo['username']}<if condition="$vo['company_name'] neq NULL">【{$vo['company_name']}】</if></span><a href="javascript:;" class="pname-delete ml10" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="glyphicon glyphicon-trash"></i></a><input type="hidden" name="hide_val[]" value="{$vo['id']}">
								</div>
							</div>
						</foreach>
					</if>
				</div>
				<div <if condition="($project['info_id'] eq NULL) and ($customer_c neq NULL) and (($project['center_id'] eq 130005) or ($project['center_id'] eq 130011))">class="select-cont active"<else />class="select-cont"</if>>
					<if condition="($project['info_id'] eq NULL) and ($customer_c neq NULL) and (($project['center_id'] eq 130005) or ($project['center_id'] eq 130011))">
						<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
							<foreach name="customer_c" item="vo">
								<div class="form-item user-add clearfix">
									<div class="input-label"></div>
									<div class="input-item">
										<span>{$vo['username']}<if condition="$vo['company_name'] neq NULL">【{$vo['company_name']}】</if></span>
										<span class="input-prompt"><i class="glyphicon glyphicon-exclamation-sign ml10"></i> 拓展项目客户</span>
									</div>
								</div>
							</foreach>
						<else />
							<div class="form-item user-add clearfix">
								<div class="input-label"></div>
								<div class="input-item">
									<foreach name="customer_c" item="vo">
									<span class="mr20">
										<a href="javascript:;" class="detail" mid="{$vo['id']}">{$vo['username']}<if condition="$vo['company_name'] neq NULL">【{$vo['company_name']}】</if></a>
									</span>
									</foreach>
									<span class="input-prompt"><i class="glyphicon glyphicon-exclamation-sign ml10"></i> 拓展项目客户</span>
								</div>
							</div>
						</if>
					</if>
				</div>
			</div>
			</if>
			<div class="form-main">
				<div class="form-title">项目信息</div>
				<if condition="($project['info_id'] eq NULL) and (($project['center_id'] eq 130004) or ($project['center_id'] eq 130005) or ($project['center_id'] eq 130011))">
				<div class="form-item clearfix">
					<div class="item-float">
						<div class="input-label"><if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><span class="asterisk">*</span></if>项目类型</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<select name="p_type" class="form-control select-add" autocomplete="off">
									<option value="-10" selected>请选择</option>
									<foreach name="ptype_list" item="vo">
										<option value="{$vo['id']}" <if condition="$project_bg['p_type'] eq $vo['id']">selected</if>>{$vo['second_name']}</option>
									</foreach>
								</select>
								<input type="text" name="p_type_input" class="form-control select-add-text ml5" autocomplete="off">
								<span class="error-item">必填项</span>
								<span class="error-item">该项目类型已存在</span>
							<else/>
								{$project_bg['p_type_name']}
							</if>
						</div>
					</div>
					<div class="item-float">
						<div class="input-label">拓展项目编号</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<select name="bus_id" <if condition="($project['info_id'] eq NULL) and (($project['center_id'] eq 130005) or ($project['center_id'] eq 130011))">class="form-control required-selt w300 bus_id"<else />class="form-control required-selt w300"</if> autocomplete="off">
									<option value="-10" selected>请选择</option>
									<foreach name="business" item="vo">
										<!--<option value="{$vo['id']}" <if condition="$project_bg['bus_id'] eq $vo['id']">selected</if>>[{$vo['project_num']}]{$vo['project_name']}</option>-->
										<option value="{$vo['project_id']}" <if condition="$project_bg['bus_id'] eq $vo['project_id']">selected</if>>[{$vo['project_num']}]{$vo['name']}</option>
									</foreach>
								</select>
							<else/>
								<!-- <a href="__APP__/Project/project_situation/id/{$project_bg['bus_id']}" target="_blank">{$project_bg['bus_num']}</a> -->
								<a href="__APP__/CrmProject/detail/project_id/{$project_bg['bus_id']}" target="_blank">{$project_bg['bus_num']}</a>
							</if>
						</div>
					</div>
				</div>
				</if>
				<if condition="($project['info_id'] eq NULL) and ($project['center_id'] eq 130004)">
				<div class="form-item clearfix">
					<div class="item-float">
						<div class="input-label">合同金额(元)</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" class="form-control money" name="contract_money" value="{$project_bg['contract_money']}" autocomplete="off">
								<span class="error-item">必须是大于0的正整数</span>
							<else/>
								{$project_bg['contract_money']}
							</if>
						</div>
					</div>
					<div class="item-float">
						<div class="input-label">执行金额(元)</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" class="form-control money" name="execute_money" value="{$project_bg['execute_money']}" autocomplete="off">
								<span class="error-item">必须是大于0的正整数</span>
							<else/>
								{$project_bg['execute_money']}
							</if>
						</div>
					</div>
				</div>
				<div class="form-item clearfix">
					<div class="item-float">
						<div class="input-label">项目周期(月)</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" class="form-control" name="cycle_date" value="{$project_bg['cycle_date']-0?$project_bg['cycle_date']-0:NULL}" autocomplete="off">
								<span class="error-item">必须是大于0且可保留2位的数字</span>
							<else/>
								{$project_bg['cycle_date']-0?$project_bg['cycle_date']-0:NULL}
							</if>
						</div>
					</div>
					<div class="item-float">
						<div class="input-label">项目预算(元)</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" class="form-control money" name="project_budget" value="{$project_bg['project_budget']}" autocomplete="off">
								<span class="error-item">必须是大于0的正整数</span>
							<else/>
								{$project_bg['project_budget']}
							</if>
						</div>
					</div>
				</div>
				</if>
				<if condition="($project['info_id'] eq NULL) and (($project['center_id'] eq 130005) or ($project['center_id'] eq 130011))">
				<div class="form-item clearfix">
					<div class="item-float">
						<div class="input-label">合同金额(元)</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" class="form-control money" name="contract_money" value="{$project_bg['contract_money']}" autocomplete="off">
								<span class="error-item">必须是大于0的正整数</span>
							<else/>
								{$project_bg['contract_money']}
							</if>
						</div>
					</div>
					<div class="item-float">
						<div class="input-label">项目周期(月)</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" class="form-control" name="cycle_date" value="{$project_bg['cycle_date']-0?$project_bg['cycle_date']-0:NULL}" autocomplete="off">
								<span class="error-item">必须是大于0且可保留2位的数字</span>
							<else/>
								{$project_bg['cycle_date']-0?$project_bg['cycle_date']-0:NULL}
							</if>
						</div>
					</div>
				</div>
				</if>
				<if condition="($project['info_id'] eq NULL) and (($project['center_id'] eq 130005) or ($project['center_id'] eq 130011))">
				<div class="form-item clearfix">
					<div class="item-float">
						<div class="input-label">合作方式</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" name="cooperation_mode" class="form-control" value="{$project_bg['cooperation_mode']}" autocomplete="off">
							<else/>
								{$project_bg['cooperation_mode']}
							</if>
						</div>
					</div>
					<div class="item-float">
						<div class="input-label">景区等级</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" name="scenic_level" class="form-control" value="{$project_bg['scenic_level']}" autocomplete="off">
							<else/>
								{$project_bg['scenic_level']}
							</if>
						</div>
					</div>
				</div>
				<div class="form-item clearfix">
					<div class="item-float" colspan="2">
						<div class="input-label"><if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><span class="asterisk">*</span></if>项目阶段</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<if condition="($opera eq 1) and ($project_bg['project_stage'] eq '已开业')">
									{$project_bg['project_stage']}
								<else/>
									<span class="checkbox-item">
										<label class="radio-inline"><input type="radio" name="project_stage" value="建设期" <if condition="$project_bg['project_stage'] eq '建设期'">checked</if> autocomplete="off">建设期</label>
										<label class="radio-inline"><input type="radio" name="project_stage" value="已开业" <if condition="$project_bg['project_stage'] eq '已开业'">checked</if> autocomplete="off">已开业</label>
										<span class="error-item">必填项</span>
									</span>
								</if>
							<else/>
								{$project_bg['project_stage']}
							</if>
						</div>
					</div>
				</div>
				</if>
				<if condition="($project['info_id'] eq NULL) and $project['center_id'] eq 130004">
				<div class="form-item clearfix" style="padding-bottom:5px;">
					<div class="item-float" colspan="2">
						<div class="input-label">考察日期</div>
						<div class="input-item day-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<foreach name="investigate_dates" item="vo">
								<div class="left mr10 mb5">
									<if condition="$key!=0">
										<input type="text" name="investigate_date[]" class="form-control Wdate w100 mr5 left add-date" onclick="WdatePicker()" value="{$vo}" autocomplete="off" readonly>
										<a href="javascript:;" class="delete left" zid="4" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="glyphicon glyphicon-trash"></i></a>
										<span class="error-item">请先选择第一个日期</span>
									</if>
									<if condition="$key==0">
										<input type="text" name="investigate_date[]" class="form-control Wdate w100 mr5 left" onclick="WdatePicker({isShowClear:true})" value="{$vo}" autocomplete="off" readonly>
										<a href="javascript:;" class="data-add left" data-toggle="tooltip" data-placement="bottom" title="继续添加"><i class="glyphicon glyphicon-plus"></i></a>
										<span class="error-item">请先选择第一个日期</span>
									</if>
								</div>
								</foreach>
							<else/>
								{$project_bg['investigate_date']}
							</if>
						</div>
					</div>
				</div>
				</if>
				<if condition="($project['info_id'] neq NULL)">
				<div class="form-item clearfix">
					<div class="item-float">
						<div class="input-label"><if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><span class="asterisk">*</span></if>拓展类型</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<select name="business_type" class="form-control select-add w150" autocomplete="off">
									<option value="-10" selected>请选择</option>
									<foreach name="bus_list" item="vo">
										<option value="{$vo['id']}" <if condition="$project_bg['business_type'] eq $vo['id']">selected</if>>{$vo['second_name']}</option>
									</foreach>
								</select>
								<input type="text" name="business_type_input" class="form-control select-add-text w150 ml5" autocomplete="off">
								<span class="error-item">必填项</span>
								<span class="error-item">该商务类型已存在</span>
							<else/>
								{$project_bg['business_type_name']}
							</if>
						</div>
					</div>
					<div class="item-float">
						<div class="input-label">获悉渠道</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<input type="text" name="channel" class="form-control" value="{$project_bg['channel']}" autocomplete="off">
							<else/>
								{$project_bg['channel']}
							</if>
						</div>
					</div>
				</div>
				</if>
				<div class="form-item clearfix">
					<div class="item-float" colspan="2">
						<if condition="$project['center_id'] neq 130005">
							<div class="input-label"><if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><span class="asterisk">*</span></if>项目人员</div>
							<div class="input-item">
								<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
									<button type="button" class="is_all btn is_all_btn">选择用户</button>
									<span class="error-item">请选择用户</span>
									<if condition="$project_bg['project_users'] neq NULL"><div class="users-list"><strong>已选用户：</strong>{$project_bg['project_users']}</div><else/><div class="users-list"></div></if>
									<input type="hidden" name="uids" class="uids-input" value="{$project_bg['project_uids']}" autocomplete="off"/>
									<input type="hidden" name="users" class="users-input" value="{$project_bg['project_users']}" autocomplete="off"/>
								<else />
									{$project_bg['project_users']}
								</if>
							</div>
						<else/>
							<div class="input-label">项目人员</div>
							<div class="input-item">
								{$project_bg['project_users']}<span class="input-prompt"><if condition="($project_bg['status'] eq -1)"><i class="glyphicon glyphicon-exclamation-sign ml10"></i> 可在项目人员管理功能调整</span></if>
							</div>
						</if>
					</div>
				</div>
				<div class="form-item clearfix">
					<div>
						<div class="input-label"><if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><span class="asterisk">*</span></if>项目简介</div>
						<div class="input-item ch_item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<if condition="$project_bg_c['project_introduce'] eq NULL">
									<textarea name="project_introduce" class="form-control w500 h150" autocomplete="off">{$project_bg['project_introduce']}</textarea>
									<span class="error-item">必填项</span>
								<else />
									{$project_bg_c['project_introduce']}
								</if>
							<else/>
								<if condition="$project_bg_c['project_introduce'] eq NULL">{$project_bg['project_introduce']}<else />{$project_bg_c['project_introduce']}</if>
							</if>
						</div>
					</div>
				</div>
				<if condition="($project['info_id'] neq NULL)">
				<div class="form-item clearfix">
					<div class="item-float" colspan="2">
						<div class="input-label">甲方背景</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<textarea name="party_background" class="form-control w500 h150" autocomplete="off">{$project_bg['party_background']}</textarea>
							<else/>
								{$project_bg['party_background']}
							</if>
						</div>
					</div>
				</div>
				<div class="form-item clearfix">
					<div class="item-float" colspan="2">
						<div class="input-label">合作诉求</div>
						<div class="input-item">
							<if condition="(($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)) and ((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
								<textarea name="cooperative_appeals" class="form-control w500 h150" autocomplete="off">{$project_bg['cooperative_appeals']}</textarea>
							<else/>
								{$project_bg['cooperative_appeals']}
							</if>
						</div>
					</div>
				</div>
				</if>
				<if condition="($project_bg['status'] neq -1) and ($project_bg['status'] neq NULL)">
				<div class="form-item clearfix">
					<div class="item-float" colspan="2">
						<div class="input-label">添加人(时间)</div>
						<div class="input-item">
							{$project_bg['add_user']}({$project_bg['add_date']})
						</div>
					</div>
				</div>
				<div class="form-item clearfix">
					<div class="item-float" colspan="2">
						<div class="input-label">最后操作人(时间)</div>
						<div class="input-item">
							{$project_bg['edit_user']}({$project_bg['edit_date']})
						</div>
					</div>
				</div>
				</if>
			</div>
			<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
				<div class="form-btn-item">
					<if condition="($project_bg['status'] eq -1) or ($project_bg['status'] eq NULL)">
						<button class="btn btn-submit" type="button">提交</button>
					<elseif condition="$project_bg['status'] eq 1"/>
						<button class="btn lost_submit" type="button">放弃提交</button>
					</if>
				</div>
			</if>
		</form>
	</div>
</div>
<!--选择用户-->
<div class="modal fade" id="selectuser-modal">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h4>选择用户</h4>
				<i class="fa fa-times" aria-hidden="true" data-dismiss="modal"></i>
			</div>
			<div class="modal-body">
				<foreach name="user_list" item="do">
					<div class="department">
						<label><input class="department-checkbox" type="checkbox" autocomplete="off" />{$do['name']}</label>
					</div>
					<ul>
						<foreach name="do['user']" item="uo">
							<li>
								<label><input class="user-checkbox" type="checkbox" value="{$uo['id']}" <if condition="$uo['cho'] eq 1">onclick="return false;"</if> autocomplete="off" />{$uo['username']}</label>
							</li>
						</foreach>
					</ul>
				</foreach>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn user-affirm">确认</button><button type="button" class="btn btn-default user-cancel" data-dismiss="modal">取消</button>
			</div>
		</div>
	</div>
</div>
<!--弹出框-->
<div class="modal fade" id="customeModal">
	<div class="modal-dialog w800">
		<div class="modal-content">
			<div class="modal-header">
				<h4>添加客户</h4>
				<i class="fa fa-times" aria-hidden="true" data-dismiss="modal"></i>
			</div>
			<div class="modal-body"></div>
		</div>
	</div>
</div>
<!--客户详情-->
<div id="detailModal" class="modal hide fade">
	<div class="modal-dialog w800">
		<div class="modal-content">
			<div class="modal-header">
				<h4 id="myModalLabel">客户详情</h4>
				<i class="fa fa-times" aria-hidden="true" data-dismiss="modal"></i>
			</div>
			<div class="modal-body"></div>
		</div>
	</div>
</div>
<!--编辑客户-->
<div id="customeEdit2" class="modal hide fade">
	<div class="modal-dialog w800">
		<div class="modal-content">
			<div class="modal-header">
				<h4>编辑客户</h4>
				<i class="fa fa-times" aria-hidden="true" data-dismiss="modal"></i>
			</div>
			<div class="modal-body">
				<form class="add-custome-edit2">
					<input type="hidden" name="con_type" value="2">
					<input type="hidden" name="company_id">
					<input type="hidden" name="center_id">
					<table class="table table-bordered">
						<tr>
							<td class="bold_td" width="12%"><strong class="red">*</strong>姓名</td>
							<td width="39%">
								<span class="name-text"></span>
								<input type="text" name="username" class="form-control required-text">
								<span class="error-item">必填项</span>
							</td>
							<td class="bold_td" width="10%"><strong class="red">*</strong>性别</td>
							<td width="39%">
								<label class="radio-inline"><input type="radio" name="gender" value='男' autocomplete="off">男</label>
								<label class="radio-inline"><input type="radio" name="gender" value='女' autocomplete="off">女</label>
								<span class="error-item">必填项</span>
							</td>
						</tr>
						<tr>
							<td class="bold_td"><strong class="red">*</strong>公司名称</td>
							<td>
								<input type="text" name="company_name" class="form-control required-text">
								<span class="error-item">必填项</span>
							</td>
							<td class="bold_td">职位</td>
							<td>
								<input type="text" name="job" class="form-control">
							</td>
						</tr>
						<tr>
							<td class="bold_td">手机号</td>
							<td>
								<input type="text" name="mobilephone" maxlength="11" placeholder="手机号或座机号必须填写一项" class="form-control">
								<div class="error-item">请填写正确的手机号</div>
							</td>
							<td class="bold_td">座机号</td>
							<td>
								<input type="text" name="telephone" placeholder="手机号或座机号必须填写一项" class="form-control">
								<div class="error-item">请填写正确的座机号</div>
							</td>
						</tr>
						<tr>
							<td class="bold_td">QQ</td>
							<td>
								<input type="text" name="qq" class="form-control">
								<div class="error-item">请填写正确的QQ</div>
							</td>
							<td class="bold_td">邮箱</td>
							<td>
								<input type="text" name="email" class="form-control">
								<div class="error-item">请填写正确的邮箱</div>
							</td>
						</tr>
						<tr>
							<td class="bold_td"><strong class="red">*</strong>地址</td>
							<td colspan="3">
								<select name="province_id" class="w150 required-select">
									<option value="-10">省</option>
									<foreach name="province_list" item="vo">
										<option value="{$vo['id']}">{$vo['name']}</option>
									</foreach>
								</select>
								<select name="city_id" class="w150 required-select marginLeft10">
									<option value="-10">市</option>
								</select>
								<span class="error-item">省市必填</span>
								<input class="form-control marginLeft10" style="width: 274px" type="text" name="address" placeholder="详细地址（可不填）">
							</td>
						</tr>
						<tr>
							<td class="bold_td">其它信息</td>
							<td colspan="3">
								<input type="text" name="remark" class="form-control" style="width:580px;">
							</td>
						</tr>
					</table>
					<div class="text-center modal-footer" style="border: none"><span class="ajax_error_tip2 error-item hide mr10"></span><input type="button" class="btn btn-card2" value="提交"></div>
				</form>
			</div>
		</div>
	</div>
</div>
<include file="Include:javascript" />
<script type="text/javascript" src="__PUBLIC__/js/user_select.js"></script>
<script type="text/javascript">
$(function() {
	//客户详情
	$(".detail").on("click",function(){
		var mid = $(this).attr("mid");
		$.ajax({
			type:"POST",
			async:false,
			dataType:"json",
			data:{"id":mid},
			url:"__APP__/Project/project_card_detail",
			success:function(data){
				var html = "<table class='table table-bordered'>";
				html+="<tr><td class='side_td' width='10%'>姓名</td><td width='40%'>";
				html+=data.username ? data.username : "";
				html+="</td>";
				html+="<td class='side_td' width='10%'>性别</td><td width='40%'>";
				html+=data.gender ? data.gender : "";
				html+="</td></tr>";
				html+="<tr><td class='side_td'>公司名称</td><td>";
				html+=data.company_name ? data.company_name : "";
				html+="</td><td class='side_td'>职位</td><td>";
				html+=data.job ? data.job : "";
				html+="</td></tr>";
				html+="<tr><td class='side_td'>手机号</td><td>";
				html+=data.mobilephone ? data.mobilephone : "";
				html+="</td><td class='side_td'>座机号</td><td>";
				html+=data.telephone ? data.telephone : "";
				html+="</td></tr>";
				html+="<tr><td class='side_td'>QQ</td><td>";
				html+=data.qq ? data.qq : "";
				html+="</td><td class='side_td'>邮箱</td><td>";
				html+=data.email ? data.email : "";
				html+="</td></tr>";
				html+="<tr><td class='side_td'>地址</td><td colspan='3'>";
				if(data.province){
					html+=data.province+"-"+data.city;
					html+=data.address ? "-"+data.address : "";
				}else{
					html+=data.address ? data.address : "";
				}
				html+="</td></tr>";
				html+="<tr><td class='side_td'>其它信息</td><td colspan='3'>";
				html+=data.remark ? data.remark : "";
				html+="</td></tr>";
				html+="</table>";
				$("#detailModal").find(".modal-body").html(html).end().modal();
			}
		});
	});
	if($(".select-cont").hasClass('active')){
		var textval ='';
	}else{
		var textval = $("[name='project_introduce']").val();
	}
	if($('.add-cont .user-add').length<1){
		$('.add-cont').prev('.form-item').css('border','0')
	}
	//项目号切换
	var bus_id = "{$project_bg['bus_id']}",
		se_text = $('.select-cont').html();
	$(".bus_id").change(function(){
		var val = $(this).val();
		if(val==-10){
			$('.select-cont').html('').removeClass('active');
			$('.ch_item').html("<textarea name='project_introduce' class='form-control w500 h150' autocomplete='off'>"+textval+"</textarea><span class='error-item'>必填项</span>");
		}else{
			if(val!=bus_id){
				$.ajax({
					type:"POST",
					async:false,
					dataType:"json",
					data:{"id":val},
					url:"__APP__/Project/project_bg_ajax",
					success:function(data){
						$('.ch_item').html(data.project_introduce);
						var cont = $('.select-cont'),
							html = '';
						for(var i=0; i<data.person.length;i++){
							html+= "<div class='form-item user-add clearfix'>";
							html+= "<div class='input-label'></div>";
							html+= "<div class='input-item'>";
							if(data.person[i].company_name){
								html+= "<span>"+data.person[i].username+"【"+data.person[i].company_name+"】</span>";
							}else{
								html+= "<span>"+data.person[i].username+"</span>";
							}
							html+= "</div>";
							html+= "</div>";
						}
						cont.html(html).addClass('active');
					}
				});
			}else{
				$('.select-cont').html(""+se_text+"");
				$.ajax({
					type:"POST",
					async:false,
					dataType:"json",
					data:{"id":val},
					url:"__APP__/Project/project_bg_ajax",
					success:function(data){
						$('.ch_item').html(data.project_introduce);
						$('.select-cont').addClass('active');
					}
				})
			}
		}
	})
	//删除客户
	$(document).on('click','.pname-delete',function(){
		$(this).parents('.user-add').remove();
	})
	//编辑客户
	$(".btn-edit").on("click",function(){
		var pid = $(this).attr("pid"),
			mid = $(this).attr("mid");
			
		$.ajax({
			type:"POST",
			async:false,
			dataType:"json",
			data:{"pid":pid,"id":mid},
			url:"__APP__/Project/project_card_edit",
			success:function(data){
				var modal = $("#customeEdit2");
				//省
				var province = "<option value='-10'>省</option>";
				for(var i in data.province_list){
					province += "<option value="+data.province_list[i].id+">"+data.province_list[i].name+"</option>";
				}
				modal.find("[name='province_id']").html(province).find("option[value='"+data.info.province_id+"']").prop("selected",true).end().select2();
				//市
				var city = "<option value='-10'>市</option>";
				for(var i in data.city_list){
					city += "<option value="+data.city_list[i].id+">"+data.city_list[i].name+"</option>";
				}
				modal.find("[name='city_id']").html(city).find("option[value='"+data.info.city_id+"']").prop("selected",true).end().select2();
				//其它
				if(data.no_edit==1 && data.info.username){
					modal.find(".name-text").text(data.info.username);
					modal.find("[name='username']").hide();
				}else{
					modal.find(".name-text").text("");
					modal.find("[name='username']").show();
				}
				modal.find("[name='company_id']").val(data.info.company_id);
				modal.find("[name='center_id']").val(data.info.center_id);
				modal.find("[name='username']").val(data.info.username);
				modal.find("[name='gender'][value='"+data.info.gender+"']").prop("checked",true);
				modal.find("[name='company_name']").val(data.info.company_name);
				modal.find("[name='job']").val(data.info.job);
				modal.find("[name='mobilephone']").val(data.info.mobilephone);
				modal.find("[name='telephone']").val(data.info.telephone);
				modal.find("[name='qq']").val(data.info.qq);
				modal.find("[name='email']").val(data.info.email);
				modal.find("[name='address']").val(data.info.address);
				modal.find("[name='remark']").val(data.info.remark);
				modal.find(".btn-card2").attr({"pid":pid,"mid":mid});
				modal.modal();
			}
		});
	});
	//编辑其他客户提交
	(function(){
		var custome2 = $("form.add-custome-edit2");
		custome2.find("select").select2();
		//省市联动
		custome2.find("[name='province_id']").change(function(){
			var id = $(this).val();
			$.ajax({
				type:"POST",
				dataType:'json',
				data:{'region':id,'type':1,'bool':1},
				url:"__APP__/Communal/get_province_city",
				success:function(data){
					var option = "";
					if(data){
						option += "<option value='-10'>请选择</option>";
						if(data){
							for(var i=0;i<data.length;i++){
								option += "<option value="+data[i].id+">"+data[i].name+"</option>";
							}
						}
					}else{
						option += "<option value='-10'>市</option>";
					}
					custome2.find("[name='city_id']").html(option).select2();
				}
			});
		});
		//表单验证
		custome2.find(".btn-card2").click(function(){
			var tag = true;
			custome2.find(".required-text").each(function(){
				var $val = $(this).val();
				if($val=="" || /^\s+$/.test($val)){
					$(this).next(".error-item").show();
					tag = false;
				}
			});
			custome2.find("select.required-select").each(function(){
				var $val = $(this).val();
				if($val==-10){
					$(this).nextAll(".error-item").show();
					tag = false;
				}
			});
			custome2.find("[name='mobilephone']").each(function(){
				var $val = $(this).val();
				if($val!="" && !/^1[3|4|5|7|8]\d{9}$/.test($val)){
					$(this).next(".error-item").show();
					tag = false;
				}
			});
			custome2.find("[name='telephone']").each(function(){
				var $val = $(this).val();
				if($val!="" && !/^(\d{3,4}\-?)?\d{7,8}(\-\d{3,4})?$/.test($val)){
					$(this).next(".error-item").show();
					tag = false;
				}
			});
			custome2.find("[name='email']").each(function(){
				var $val = $(this).val();
				if($val!="" && !/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($val)){
					$(this).next(".error-item").show();
					tag = false;
				}
			});
			custome2.find("[name='qq']").each(function(){
				var $val = $(this).val();
				if($val!="" && !/^[1-9]\d{4,10}$/.test($val)){
					$(this).next(".error-item").show();
					tag = false;
				}
			});
			if(custome2.find("[name='mobilephone']").val()=="" && custome2.find("[name='telephone']").val()==""){
				$("#customeEdit2").find(".ajax_error_tip2").text("手机号或座机号必须填写一项").show();
				tag = false;
			}		
			if(custome2.find("[name='gender']:checked").length==0){
				custome2.find("[name='gender']").parent("label").nextAll(".error-item").show();
				tag = false;
			}

			if(tag){
				var pid = custome2.find(".btn-card2").attr("pid"),
					mid = custome2.find(".btn-card2").attr("mid");
				$.ajax({
					type:"POST",
					async:false,
					dataType:"json",
					data:custome2.serialize()+"&pid="+pid+"&id="+mid,
					url:"__APP__/Project/project_card_doedit",
					success:function(data){
						if(data.status==0){
							$("#customeEdit2").find(".ajax_error_tip2").text(data.msg).show();
						}else{
							$("#customeEdit2").hide();
							success_pop(data.status,data.msg);
						}
					}
				});
			}
		});
		//隐藏错误提示
		custome2.find("[name='mobilephone'],[name='telephone']").focus(function(){
			$(this).next(".error-item").hide();
			$("#customeEdit2").find(".ajax_error_tip2").text("").hide();
		});
		custome2.find(".required-text,[name='qq'],[name='email']").focus(function(){
			$(this).next(".error-item").hide();
		});
		custome2.find("select.required-select").change(function(){
			$(this).nextAll(".error-item").hide();
			$("#customeEdit2").find(".ajax_error_tip2").text("").hide();
		});
		custome2.find("[name='gender']").click(function(){
			$(this).parent("label").nextAll(".error-item").hide();
		});
		$('#customeEdit2').on("hidden",function(){
			$(this).find(":text").val("");
			$(this).find(".error-item").hide();
			$(this).find(".ajax_error_tip2").text("").hide();
		});
	})();
	$("[name='user']").trigger("change");
	$(".add_cus").click(function(){
		var pid = "{$project['id']}",
			center_id = "{$project['center_id']}",
			arr = [];
		$("[name='hide_val[]']").each(function(){
			arr.push($(this).val());
		});
		$('#customeModal').find('.modal-body').load("__APP__/Project/project_card_add/pid/"+pid+"/way/2/center_id/"+center_id+"/arr/"+arr).end().modal('show');
	});
	$("select.select-add").change(function(){
		select_change();
	})
	//返回
	$(".js_back1").click(function(){
		document.location.href="";
	});
	//日期添加
	$('.data-add').click(function(){
		if($("[name='investigate_date[]']").val()!=''){
			$(this).parents('.day-item').append("<div class='left mr10 mb5'><input type='text' class='form-control Wdate w100 mr5 left add-date' onclick='WdatePicker()' name='investigate_date[]' readonly autocomplete='off'><a href='javascript:;' class='delete left' zid='4' data-toggle='tooltip' data-placement='bottom' title='删除'><i class='glyphicon glyphicon-trash'></i></a><div>");
			$(this).parents('.day-item').find('.delete').tooltip({trigger:'hover'});
		}else{
			$(this).siblings('.error-item').show();
		}
	})
	$('.day-item').on('click','.delete',function(){
		$(this).parent("div").remove();
	})
	//人员选择
	$(".is_all").click(function(){
		$("#selectuser-modal").modal("show");
	});
	//表单验证
	$(".btn-submit").click(function(e){
		var tag = false;
		if($('.add-cont .user-add').length<1){
			$('.add_cus').next(".error-item").show();
			tag = true;
		}
		$(".checkbox-item").each(function(){
			var $val = $("[name='project_stage']:checked").length;
			if($val==0){
				$(".checkbox-item").find(".error-item").show();
				tag = true;
			}
		});
		$(".money").each(function(){
			var val = $(this).val();
			if(val!=""){
				if(!/^[1-9][0-9]*$/.test(val) && val!=""){
					$(this).nextAll(".error-item").show();
					tag = true;
				}
			}
		});
		$("[name='cycle_date']").each(function(){
			var val = $(this).val();
			if(val==''){

			}else if(!/(^0\.\d{1,2}$)|(^[1-9][0-9]*(\.\d{1,2})?$)/.test(val)){
				$(this).nextAll(".error-item").show();
				tag = true;
			}
		});

		if($("[name='users']").val()==""){
			$(".is_all").next(".error-item").show();
			tag = true;
		}
		$("[name='project_introduce']").each(function(){
			if($(this).val()==""){
				$(this).next(".error-item").eq(0).show();
				tag = true;
			}
		});
		$("select.select-add").each(function(){
			var $this = $(this),
				val = $this.val(),
				text = $this.nextAll(".select-add-text").val();
			if(val==-10 && text==""){
				$this.nextAll(".error-item").eq(0).show();
				tag = true;
			}else{
				$this.find("option").each(function(){
					if($(this).text()==text){
						$this.nextAll(".error-item").eq(1).show()
						tag = true;
						return false;
					}
				});
			}
		});
		//判断日期为空
		var tag2 = true;
		$(".day-item").find(".add-date").each(function(i){
			if($(this).val()==""){
				tag = true;
				tag2 = false;
				defeated_alert("添加考察日期不能为空！");
				return false;
			}
		});
		//判断日期重复
		if(tag2){
			var arr = [];
			$(".day-item").find(".Wdate").each(function(i){
				arr[i]=$(this).val();
			});
			if($(".day-item").find(".Wdate").length>1 && $("[name='investigate_date[]']").val()!=''){
				var arrStr = JSON.stringify(arr),str;
				for(var i=0;i<arr.length;i++) {
					if((arrStr.match(new RegExp(arr[i],"g")).length)>1){
						tag = true;
						defeated_alert("考察日期重复！");
						return false;
					}
				}
			}
		}
		
		if(tag){
			return false;
		}else{
			$.ajax({
				type:"POST",
				async:false,
				dataType:"json",
				data:$("[name='number_validate']").serialize(),
				url:"__APP__/Project/project_bg_submit",
				success:function(data){
					success_pop(data.status,data.msg);
				}
			});
		}
	});
	$('.lost_submit').click(function(){
		var mid = "{$project_bg['id']}";
		$.ajax({
			type:"POST",
			async:false,
			dataType:"json",
			data:{"id":mid,"action":"cancel"},
			url:"__APP__/Project/project_bg_submit",
			success:function(data){
				success_pop(data.status,data.msg);
			}
		});
	})
	//隐藏错误提示
	$("[name='project_introduce'],[name='user_number'],[name='email'],[name='password'],[name='regname'],.select-add-text,.money").focus(function(){
		$(this).nextAll(".error-item").hide();
	});
	$(".checkbox-item").on('click',"label",function(){
		$(this).parents(".checkbox-item").find(".error-item").hide();
	});
	$(".is_all_btn").click(function(){
		$(this).siblings(".error-item").hide();
	});
	$("[name='investigate_date'],[name='investigate_date[]']").click(function(){
		$(this).nextAll(".error-item").hide();
	});
	$("select.required-selt,select.select-add").change(function(){
		$(this).nextAll(".error-item").hide();
	});
	select_change();
});
function select_change(){
	$('.select-add').each(function(i){
		//var $val = $('.select-add').val();
		if($('.select-add').eq(i).val()!= -10){
			$('.select-add').eq(i).nextAll(".select-add-text").val('').hide();
		}else{
			$('.select-add').eq(i).nextAll(".select-add-text").show();
		}
	})
}
</script>
</body>
</html>